#!/bin/bash

for d in */Dockerfile ; do
    dn=${d%/Dockerfile}
    n=${dn#*_}
    echo Building $n ...
    docker rmi $n
    docker build -t $n $dn > ${n}.log
    echo Finished
    echo ==================================
done
